<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/embeds/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>地区录入</title>
<c:import url="/embeds/validate.jsp"></c:import>
<style>
.label{width:100px;text-align:right;font-weight:bold;}
</style>
</head>
<body>
    <div class="content-box">
      <!-- Start Content Box -->
      <div class="content-box-header">
        <h3>地区录入</h3>
        <div class="clear"></div>
      </div>
      <!-- End .content-box-header -->
      <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1">
        <form id="form" action="<c:url value='/admin/location!addOrUpdate.action' />" method="post">
          <input type="hidden" name="id" value="${location.id }">
          <input type="hidden" name="parentID" value="${parentID}">
          <table>
          	<tr>
          		<td class="label">地区名称:</td>
          		<td>
          			<input type="text" name="name" id="name" size="40" value="${location.name }">
          			<div id="nameTip"></div>
          		</td>		
          	</tr>
          	<tr>
          		<td class="label"></td>
          		<td>
          			<input class="button" type="submit" value="提交">
          		</td>		
          	</tr>
          </table>
          </form>
        </div>
        <!-- End #tab1 -->
      </div>
      <!-- End .content-box-content -->
    </div>
    <!-- End .content-box -->
    <div class="clear"></div>
     <script type="text/javascript">
	    $(function(){
			<c:if test="${result == 1}">
				alert("操作成功!");
				location = "<c:url value='/admin/location!list.action'/>";
			</c:if>
			<c:if test="${result == -1}">
				alert("操作失败,系统将跟进该错误！");
				location = "<c:url value='/admin/location!list.action'/>";
			</c:if>
	    });
    </script>
</body>
</html>
